package com.tg.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tg.pojo.Friend;
import com.tg.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface FriendMapper extends BaseMapper<Friend> {

    @Select("select tb_user.* from tb_user join tb_friend on tb_user.username = tb_friend.friend_username where tb_friend.username=#{username} and status=1;")
    List<User> getFriendInfoList(String username);
}
